package org.springframework.configuration;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Description;
import org.springframework.resource.Resource;
import org.springframework.resource.ResourceFormJava;

/**
 * @Author: T-jack
 * @Date: 2023-12-20-9:56
 * @Description:
 */
@Configuration
public class ResourceConfig {

	/**
	 * 从java获取资源管理对象
	 * @return 资源对象
	 */
	@Bean
	public ResourceFormJava getResourceFormJava() {
		return new ResourceFormJava() ;
	}

	/**
	 * 从spring获取资源管理对象 bean的名字为方法名
	 * @return 资源对象
	 */
	@Bean
	@Description("资源获取类")
	public Resource getResourceFormSpring() {
		return new Resource() ;
	}
}
